<template>
	<el-button @click="test">Default</el-button>
</template>

<script>
import {
    onMounted,
    reactive,
    toRefs,
    ref,
    getCurrentInstance
  } from 'vue'
  import qs from 'qs'
	export default{
		setup() {
			const {
			  proxy
			} = getCurrentInstance()
			const state = reactive({ 
				post: '计算机',
				city: '成都',
				current: 1,
				size: 5
			})
			const test =async() => {
				const obj = {//提交参数
					post: state.post,
					city: state.city,
					current: state.current,
					size: state.size,
				}
				  const res = await new proxy.$request(proxy.$urls.m().getJobList, qs.stringify(obj)).modepost()
				  console.log(res)
			}
			return {
				...toRefs(state),
				test
			}
		}
	}
</script>

<style>
</style>